gh-121103: Put free-threaded libraries in lib/python3.14t#121293
gh-121103: Put free-threaded libraries in lib/python3.14t#121293colesbury merged 5 commits intopython:mainfrom
lib/python3.14t#121293Conversation
On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.
|
|
This also fixes the test_sysconfig failure on Windows.
|
Does this mean that all of the pure Python standard library files would need to be installed in lib/python3.14t |
As far as I can tell, from a quick look at this PR: yes. |
I thought so. The real question is: Is this the outcome we anticipated? If not, I suggest keeping the stdlib and platstdlib values intact. |
|
Yes, that was the intention. The goal is to separate the installation. We run into a lot of potential problems if we have partially overlapping stdlib files. |
FTR, I totally agree with this. |
|
To expand on my previous comment: if we have kept a common stdlib and platstdlib, the Python files would be shared, but the |
|
I plan to merge this tomorrow if there are no objections |
ned-deily
left a comment
There was a problem hiding this comment.
Other than the nit comment, +1. This looks like it does what it promises. We still have a bit more to do before a free-threaded build can be installed to the same prefix as a non-free-threaded build without conflicts, primarily due to duplicate symlinked names in the bin and lib/pkgconfig directories. But this isn't really a new problem as there are similar conflicts when sharing with a debug build prior to this PR. I'd say let's merge this PR now and we can follow up in another PR for which I want to do some more investigation.
|
Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…thonGH-121293) On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation. (cherry picked from commit e8c91d9) Co-authored-by: Sam Gross <colesbury@gmail.com>
|
GH-121631 is a backport of this pull request to the 3.13 branch. |
…thon#121293) On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.
| if hasattr(sys, 'abiflags') and 't' in sys.abiflags: | ||
| abi_thread = 't' | ||
| else: | ||
| abi_thread = '' | ||
| if os.sep == '/': | ||
| libdirs = [sys.platlibdir] | ||
| if sys.platlibdir != "lib": | ||
| libdirs.append("lib") | ||
|
|
||
| for libdir in libdirs: | ||
| path = os.path.join(prefix, libdir, | ||
| f"{implementation}{ver[0]}.{ver[1]}", | ||
| f"{implementation}{ver[0]}.{ver[1]}{abi_thread}", |
There was a problem hiding this comment.
@colesbury -- would you be able to update the docs for the site module to reflect these changes to how Python finds the site-packages directory?
(The context is I'm currently working on reimplementing Python's logic here for Astral's work-in-progress type checker. I was reading through the site.py source code, and it surprised me to find logic here that wasn't documented!)
There was a problem hiding this comment.
Thanks for the pointer. I put up a PR to update the docs: #122737
On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.
lib/python3.14t(configure) #121103